package cn.itcast.controller;


import cn.itcast.constant.MessageConstant;
import cn.itcast.entity.Result;
import cn.itcast.service.OrderService;
import cn.itcast.service.SetmealService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/report")
@Slf4j
public class ReportSetMealController {

    @Reference(version = "1.0.0")
    private OrderService orderService;

    @Reference
    private SetmealService setmealService;

    /**
     * 套餐预约统计
     * @return
     */
    @GetMapping("/setmeals")
    public Result reportSetMealCount(){
        Map<String,Object> map=this.setmealService.reportSetMealCount();
        return new Result(true, MessageConstant.GET_SETMEAL_COUNT_REPORT_SUCCESS,map);

    }
}
